package com.woniuxy.hbum.user.service;

import com.woniuxy.hbum.user.dao.UserDAO;
import com.woniuxy.hbum.user.dto.UserDto;

public class LoginService {

	public boolean doLogin(UserDto baseDTO) {
		boolean result = false;
		if(baseDTO != null ){
			String name = baseDTO.getName();
			String password = baseDTO.getPassword();
			if(name.trim().length()>0 && password.trim().length()>0){
				String pass = new UserDAO().getPassByName(name);
				if(pass.trim().length()>0 && pass.equals(password)){
					result = true;
				}
			}
		}
		return result;
	}

}
